Copyright: Copyright ® 1995 Focus Systems


Sample Code

Sub Main()

'place easyrg32.dll where ever you wish,

'just be sure to place easyrg32.hlp in the same place

'add easyrg32.dll to your VB project through Tools/References

On Error Resume Next

'use one of these reserved constants or any valid hive handle

Const HKEY_CLASSES_ROOT = &H80000000

Const HKEY_CURRENT_USER = &H80000001

Const HKEY_LOCAL_MACHINE = &H80000002

Const HKEY_USERS = &H80000003

'datatype constants

Const REG_SZ = 1

Const REG_DWORD = 4

Dim oEasyReg As New EasyReg

Dim sValue As String

Dim bResult as Boolean

'initialize oEasyReg object properties

With oEasyReg

.lHKEY = HKEY_CURRENT_USER

.sSubKey = "Software\Company\Program\Settings"

.sKeyName = "Key1"

.vntValue = "the value"

.lDataType = REG_SZ

End With

'create registry entry

bResult = oEasyReg.RegSet

'retrieve registry entry

bResult = oEasyReg.RegGet sValue

MsgBox sValue

'with vntValue set to Null, this will remove the registry entry

oEasyReg.vntValue = Null

bResult = oEasyReg.RegSet

Set oEasyReg = Nothing

End Sub


Registration

EasyReg can be registered on Compuserve in the Shareware Registration (GO SWREG) area.EasyReg's registration ID is 8981.

If you prefer to mail payment, please use these instructions:

1. Enclose your email address.

2. Enclose $30.00 in U.S. currency.

3. Send to:

Focus Systems

Attn: Cris Williams

3090 Moriah Trails, #105

Memphis, TN38115

Questions or comments about EasyReg may be sent to:

 74451,1245 on Compuserve or

 74451.1245@compuserve.com on the Internet